/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ua.yandex.mergesort;

import java.util.Arrays;

/**
 *
 * @author vlad
 */
public class MergeSort  {
    
    private MergeSort() {
    }
    
    public static int[] sort(int[] array) {
        int[] sorted = Arrays.copyOf(array, array.length);
        (new SortTask(sorted, 0, sorted.length - 1)).run();
        return sorted;
    }
}
